package com.atguigu.dao.impl;

import com.atguigu.dao.BeanDao;
import com.atguigu.dao.OrderDao;
import com.atguigu.pojo.Order;


/**
 * @Author luoyin
 * @Date 12:47 2022/7/23
 **/
public class OrderDaoImpl extends BeanDao<Order> implements OrderDao {
    @Override
    public void add(Order order) throws Exception {
        Integer orderId = insert(
                "insert into t_order values (null,?,?,?,?,?,?)",
                order.getOrderSequence(),
                order.getCreateTime(),
                order.getTotalCount(),
                order.getTotalAmount(),
                order.getOrderStatus(),
                order.getUserId()
        );
        order.setOrderId(orderId);

    }
}
